package com.tools.cleanmaster.functionpage;


import android.content.Context;
import android.view.View;

import com.tools.cleanmaster.CleanApplication;

/**
 * 功能入口类型不同处理页面基类
 */
public abstract class FunctionHandler {
    protected FunctionHandlerListener handlerListener;
    protected CleanApplication imContext;
    protected View mViewRoot;

    public void setHandlerListener(FunctionHandlerListener listener) {
        this.handlerListener = listener;
    }

    // 页面初始化
    public void init(Context context, View viewRoot) {
        this.imContext = (CleanApplication)context.getApplicationContext();
        this.mViewRoot = viewRoot;
    }

    // 开始扫描
    public abstract void startStateScan();

    // 点击底部button开始处理
    public abstract void startStateHandler();

    // 正常状态假扫描
    public abstract void startStateFakeHandler();

    // 销毁对象，防止OOM
    public void onDestroyView() {

    }

}
